<template>
  <div class="common-layout" router>
    <el-container>
      <el-aside width="200px">
        <left-menu></left-menu>
      </el-aside>
      <el-container class="right-main">
        <el-header >
        <button @click="exit"> 退出</button>
        </el-header>
        <el-main>
          <RouterView />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup lang="ts">
import LeftMenu from '@/components/LeftMenu.vue';
import { RouterView } from 'vue-router';
import {useRouter} from "vue-router";
let $router = useRouter();
const exit = ()=>{
  $router.push("/login")
}

</script>

<style scoped>
.common-layout {
  width: 100%;
  height: 100%;
  display: flex;
}

.el-aside {
  height: 100%;
  width: 200px;
  background-color: #E9EBFE;
}

.right-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.el-header {
  height: 100px;
  background-color: #C7EDCC;
}

.el-main {
  flex: 1;
  background-color: #E3EDCD;
}
</style>